package com.xy.bizportdemo.setting;

import android.app.Dialog;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;

import com.xy.bizportdemo.R;

/**
 * 设置里，导入信息成功的对话框
 * Created by XIAOYUAN on 2016/12/14.
 */

public class InsertSmsAlertDlg extends Dialog {

    public InsertSmsAlertDlg(Context context) {
        super(context, R.style.NoFrameDialog);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        View view = LayoutInflater.from(context).inflate(R.layout.input_msg_success_dlg, null);
        int screenWidth = context.getResources().getDisplayMetrics().widthPixels;
        setContentView(view, new ViewGroup.LayoutParams(screenWidth, ViewGroup.LayoutParams.WRAP_CONTENT));
        findViewById(R.id.input_msg_ok).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                cancel();
            }
        });
    }

    public static void show(Context context) {
        new InsertSmsAlertDlg(context).show();
    }
}
